Campaign Manager - Segments


Adding Groups

A Group is an additional query group that can have a different resolution level to the document or to its parent group, see Nested Groups

A Group can be used when a Segment contains two or more rules from a table other than the Segment resolution table, and to create separate calculations of OR statements.

When creating a Group it is important to understand how the counts are generated.

Example

The use of groups is very powerful and allows what seems like a simple query, to provide answers for two different questions:

 

Question 1 - Find a count of all customers who made an Online Order in 2016

The main Segment resolution level is the Customer table because we want to find Customers, but the query requires two rules from the CustOrder table i.e. ChannelCode = "Online" and OrderYear = "2106"

To make a combination of Orders i.e. find an Order that had a ChannelCode of "Online" and an Order year of 2016, the two rules must be combined at the CustOrder level first, so a group would be added where that group resolves to the CustOrder table, see Resolution Levels.

 

  Resolution Level Table Column Operator Value
Group CustOrder CustOrder Channel Code Equal to O (Online)
CustOrder CustOrder OrderYear Equal to 2016

The counts here clearly show that 317,299 is a count of CustOrders i.e. there are 317,299 Orders that meet these criteria, then the document is resolved to Customer which results in 168,232. Customers who placed those Orders.

This is now the correct count for all customers who made an online order in 2016.

Question 2 - Find all Customers who have placed and Order Online (at any time), and have also placed an Order in 2016 (through any channel), so the key point here is that they do not have to be the same Order.

Si if the same query is constructed without the use of a group, as much as this would still be a valid result it would be a different question. Following the example below with no group, in this examples the two CustOrder column rules do not have a CustOrder group defining that they should be combined together at the CustOrder table, so what will happen is these two rules will both be resolved to Customer first, because the document is at Customer, and will be AND'd at the Customer level. You will note that the count now is 227, 474.

Resolution Level Table Column Operator Value
Customer CustOrder Channel Code Equal to O (Online)
Customer CustOrder OrderYear Equal to 2016

 

It is therefore best practice to add groups when combining column from another table when the requirement is that they are combined at the level.

 

How to Add a Group

On the Segment Builder screen, once you have selected a table of data for your resolution level, simply drag a table object from the Data Tree and drop onto the Segment document in the required location to create a Group resolved at that table level, or click the Add icon and select the Add Group option from the drop-down list.

This will add a Group:

For Groups created using the Add Group method, Initially the resolution level for the Group will be set to the same table as the Segment.

Select an operator to specify how the group is connected:

Include if All

Include on a group defines that the final result of this group will be included in the final result of the document. The All defines an AND operator for combining the rules or groups that are inside this group. For example, having two rules in this group of Gender=F AND Age=30 will return all females that are 30 years old , and the Include defines that the result of this group will include all females that are 30 years old in the document as a whole (or in the groups parent object)

Include if Any

Include on a group defines that the final result of this group will be included in the final result of the document. The Any defines an OR operator for combining the rules or groups that are inside this group. For example, having two rules in this group of Gender=F OR Age=30 will return all females, along with all 30 year olds (which at this point will include males), and the Includedefines that the result of this group will include all females, along with all 30 year olds, in the document as a whole (or in the groups parent object).

Exclude if All

 

Exclude on a group defines that the final result of this group will be excluded in the final result of the document. The All defines an AND operator for combining the rules or groups that are inside this group. For example, having two rules in this group of Gender=F AND Age=30 will return all females that are 30 years old, but the Exclude defines that the result of the group will exclude all females that are 30 years old in the document as a whole (or in the groups parent object).

Exclude if Any

Exclude on a group defines that the final result of this group will be excluded in the final result of the document. The Any defines an OR operator for combining the rules or groups that are inside this group. For example, having two rules in this group of Gender=F OR Age=30 will return all females, along with all 30 year olds (which at this point will include males), but the Exclude defines that the result of the group will exclude all females that are 30 years old in the document as a whole (or in the groups parent object).
  1. When creating a rule definition, firstly select the database column for the rule from the Select Column drop-down.

Click on the Select Table field to display the Select Resolution Table drop down menu:

Drill down by clicking on the required data source options until you locate the table you wish to use:

The button can be used to navigate back up through the data structure levels if required:

Alternatively use the Search field to find the required table of data.

Once located, click on the required table to select it and click the Select button.

This will add the selected table to the Select Table field.

If you wish to change the selected table, click on the field again and use the same method to select the required option.

Select Column

TO create a rule using a column, either drag the column from the Data Tree or click the down arrow in the Select Column field to display the drop down menu.

You can navigate to the column or you can search for it by clicking the search icon

The following icons are used for column types:

Icon Data Type Description
Text The column can contain alphanumeric data (text or numbers).
Integer Numeric data that has no decimal values, for example, an order number.
Real Numeric data with decimal numbers.
Date

For columns containing dates, where format will be driven by user settings.

Time Times - hour, minutes and seconds, where format will be driven by user settings.
DateTime Dates and times, where format will be driven by user settings.

Select the required Column and click the Select button:

This will add the Column to the Select Column field.

Select Operator

Select the Operator that will specify what is included based on the selected column and entered values. Click on the Equal to field drop-down. The options available will depend on the selected Column Data Type e.g. Text or Numeric:

Equal to Returns records that are equal to the selected value.
Not equal to Returns records that are not equal to the selected value.
Between Returns records between two entered values.
Contains Returns records that contain the specified text string (case-sensitive).
Does not contain Returns records that do not contain the specified text string (case-sensitive).
Greater than Returns records with a value greater than the one specified.
Greater than or equal to Returns records with a value equal to or greater than the one specified.
Less than Returns records with a value less than the one specified.
Less than or equal to Returns records with a value equal to or less than the one specified.
Has no value Returns all records for which there is no value. For example, if applied to the Income field, the records returned will be for customers who have not provided their income details.
Has a value Returns all records for which there is a value. For example, if applied to the Income field, the records returned will be for customers who have provided their income details.
Note: Nulls - if you want to select columns that contain no value, use the Has no value option to specify null.

Select Values

Select the value or values that the rule will be calculated against.

Enter a value manually or click the value picker icon to view the values available for the Column and the Counts for each value.

Value blue bars - the value picker displays available values and their respective counts, along with blue bars that represent the frequency of that value relative to the size of the table. The counts and the blue bars will reflect the selected operator. For example, in the Age column, the counts and blue bars will change if you first select the Equal operator (all age values displayed) and then select the Greater than operator (only values greater than your selected value are displayed).

Tick the check box next to the required value.  For certain operators e.g. equal to, multiple values can be added to the field by ticking the check box next to all required values.

Once a value has been added to the field, click the x next to it to remove it or untick the check box next to it, in the list.

Note:

Values entered manually are case sensitive. For example, for a Country column, 'Switzerland' will return results, whereas 'switzerland' will not. When the Select Value field contains a value, it has a colored background:

Grey box validation

The format of the value is valid and there are matching values in the database.

Red Box validation

The format of the value is not valid, for example text in a numeric column. The Calculate segment button is disabled when the format is not valid.

Click the Add icon at the Group level to add another Rule to the Group if required.

Multiple Groups can be added to a Segment.

It is also possible to nest Groups within Groups, see Nested Groups.

Rules and Groups can be rearranged if required, see Re-arranging Rules and Groups.

See also

Create a Segment

     
© Alterian. All Rights Reserved. | Privacy Policy | Legal Notice